package com.h.heal.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

public class UploadConfig implements WebMvcConfigurer {
    @Value("${upload.video}")
    private String uploadVideoPath;

    @Value("${upload.video.mapper}")
    private String uploadVideoPathMapper;

    public void addResourceHeadler(ResourceHandlerRegistry registry) {
        registry.addResourceHandler(uploadVideoPathMapper + "**").addResourceLocations("file:" + uploadVideoPath);
    }



}
